<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="css/plugins.css">
    <link rel="icon" type="image/png" href="/de4py.ico" />
    <script type="text/javascript" src="/eel.js"></script>
    <script type="text/javascript" src="js/scripts.js"></script>
    <title>de4py</title>
  </head>
  <body>
    <div class="build-number" id="buildNumber" style="position: fixed;bottom: 10px;right: 10px;color: rgba(255, 255, 255, 0.1); /* Almost invisible color */font-size: 12px;user-select: none;"></div>
    <div id="notification-container" style="position:fixed;pointer-events:none;"></div>
    <div id="loading-spin">
      <div id="loading-spinner"></div>
    </div>
    <div class="loading-screen">
      <div class="loading-bar">
        <div class="loading-bar-fill"></div>
      </div>
      <div class="loading-message">Loading de4py...</div>
    </div>
    <div class="navbar" id="navbar" style="left: -310px;">
      <div onclick="navto('home')" class="btn sebtn" style="background-image: url('feather/home.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">Home</div>
      <div onclick="navto('deobfuscator')" class="btn" style="background-image: url('feather/layers.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">Deobfuscator</div>
      <div onclick="navto('pyshell')" class="btn" style="background-image: url('feather/terminal.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">PyShell</div>
      <div onclick="navto('analyzer')" class="btn" style="background-image: url('feather/file-text.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">Analyzer</div>
      <div onclick="navto('plugins')" class="btn" style="background-image: url('feather/grid.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">Plugins</div>
      <div onclick="navto('settings')" class="btn" style="background-image: url('feather/settings.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">Settings</div>
      <div onclick="navto('about')" class="btn" style="background-image: url('feather/info.svg');background-size: 24px 24px;background-repeat: no-repeat;background-position: 10px center;">About</div>
    </div>
    <div class="menulol-container" id="menulol" style="left: 20px;">
      <div class="menulol">&#9776;</div>
    </div>
    <div class="content-container">
      <section id="winAPIhooking" class="center hidden">
        <h1>Behavior Monitoring</h1>
        <div class="frame" style="position: absolute; top: 120px;left:500px; width:400px; height:360px;">
          <h1> Output: <button onclick="document.getElementById('outputwinapihooks').select(); document.execCommand('copy');createnotification('success', 'Copied');" style="margin-left: 150px;" class="btns">Copy Output</button></h1>
          <textarea class="scroll-box" id="outputwinapihooks" style="height:250px;width: 380px;font-family: 'Share Tech Mono', monospace; resize:none;outline: none;"></textarea>
        </div>
      <div style="position: absolute; top: 120px; left: 50px; width: 350px; height: 150px;">
        <div class="checkbox-container">
          <label for="MFBOX">Monitor Files:</label>
          <input type="checkbox" id="MFBOX">
        </div>
        <div class="checkbox-container">
          <label for="MPBOX">Monitor Processes:</label>
          <input type="checkbox" id="MPBOX">
        </div>
        <div class="checkbox-container">
          <label for="MCBOX">Monitor Connections:</label>
          <input type="checkbox" id="MCBOX">
          <label for="MCDUMPBOX">Dump Socket:</label>
          <input type="checkbox" id="MCDUMPBOX">
        </div>
        <div class="checkbox-container">
          <label for="SSL">Dump OpenSSL Encrypted traffic:</label>
          <input type="checkbox" id="SSLBOX">
        </div>
        <div class="checkbox-container">
          <label for="PYCDUMB">PYC dumper:</label>
          <input type="checkbox" id="PYCDUMB">
        </div>
        <br>
        <button class="btns" onclick="navto('pyshell')">Back to PyShell menu</button>
      </div>
      </section>
      <section id="home" class="center active">
        <h1>De4py home</h1>
        <div class="frame" style="position: absolute; top: 120px;left:100px; width:300px; ">
          <h1>Change LOG</h1>
          <div style="max-height:250px;" id="changeLog" class="scroll-box"></div>
        </div>
        <div class="frame" style="position: absolute; top: 120px;left:600px; width:300px; ">
          <h1>Environment info</h1>
          <ul>
            <li>Python version: <span id="pv">{NULL}</span>
            </li>
            <li>Arch: <span id="arch">{NULL}</span>
            </li>
            <li>Operating System: <span id="os">{NULL}</span>
            </li>
          </ul>
        </div>
        <div class="frame" style="position: absolute; top: 320px;left:600px; width:300px; ">
          <div class="clock-container">
            <div class="clock" id="clock">Loading...</div>
          </div>
        </div>
      </section>
      <section id="deobfuscator" class="hidden center">
        <h1>De4py deobfuscator</h1>
        <div class="frame" style="position: absolute; top: 120px; left: 50px; width: 350px; height: 150px;">
          <input onclick="getpath(0)" type="button" id="fileinput" style="display: none;">
          <label class="btns" for="fileinput" style="cursor: pointer;">Select a file</label>
          <span class="frame" style="padding:10px" id="selectedFileName">None</span>
          <button style="margin-top: 70px;margin-left:100px;" class="btns" onclick="startdeobf()">Deobfuscate</button>
        </div>
        <div class="frame" style="position: absolute; top: 120px;left:500px; width:400px; height:350px;">
          <h1> Output: <button onclick="document.getElementById('outputDEOBF').select(); document.execCommand('copy');createnotification('success', 'Copied');" style="margin-left: 150px;" class="btns">Copy Output</button>
          </h1>
          <textarea class="scroll-box" id="outputDEOBF" style="height:260px;width: 380px; font-family: 'Share Tech Mono', monospace; resize:none;outline: none;"></textarea>
        </div>
      </section>
      <section id="pyshell" class="center hidden">
        <h1>De4py pyshell</h1>
        <div class="frame" style="position: absolute; top: 120px; left: 50px; width: 350px; height: 85px;">
          <label for="pidinput">Target pid:</label>
          <input type="text" id="pidinput" class="custom-input">
          <div style="text-align: center;">
            <button style="margin-top: 15px; margin-left: 10px;" class="btns" onclick="injectpyshell('normal')">Inject</button>
            <button style="margin-top: 15px; margin-left: 10px;" class="btns" onclick="injectpyshell('stealth')">Stealth Inject</button>
        </div>        
        </div>
        <div class="frame" style="position: absolute; top: 270px; left: 50px; width: 890px; height: 240px; padding:0px;">
          <h1 style="margin-left:390px;">Commands</h1>
          <div style="padding-left: 40px;">
            <button class="btns" onclick="exec_command('ExecPY')">exec py code</button>
            <button class="btns" onclick="exec_command('ForceCrash')">crash process</button>
            <button class="btns" onclick="exec_command('GetFunctions')">get all functions</button>
            <button class="btns" onclick="pid_widget(1)">force show console</button>
          </div>
          <div style="padding-left: 40px;margin-top: 20px;">
            <button class="btns" onclick="exec_command('PyshellGUI')">Pyshell (tkinter GUI)</button>
            <button class="btns" onclick="exec_command('DumpStrings')">Dump strings</button>
            <button class="btns" onclick="exec_command('delExit')">Remove exit function</button>
            <button class="btns" onclick="exec_command('DeattachDLL')">Deattach DLL</button>
          </div>
          <div style="padding-left: 40px;margin-top: 20px;">
            <button class="btns" onclick="exec_command('GetAnalyzerHandle')">Behavior Monitoring</button>
          </div>
        </div>
        <div class="frame" style="position: absolute; top: 120px;left:500px; width:400px; height:85px;">
          <h3>Output:</h3>
          <textarea class="scroll-box" id="outputPYSHELL" style="height:5px;width: 380px;font-family: 'Share Tech Mono', monospace; resize:none;outline: none;overflow:hidden;"></textarea>
        </div>
        <div id="IDKWHATSHOULDINAMEIT" style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;backdrop-filter: blur(5px);background-color: rgba(0, 0, 0, 0.5);z-index: 9999;display:none;">
          <div style="padding-left: 800px;margin-top: 50px;">
            <button class="btns" onclick="pid_widget(0)">X</button>
          </div>
          <div class="frame" style="position: absolute; top: 120px;left:300px; width:400px; height:100px">
            <label for="scpid">Target pid:</label>
            <input type="text" id="scpid" class="custom-input">
            <div style="padding-left: 100px;margin-top: 30px;">
              <button class="btns" onclick="exec_command('ShowConsole')">unhide console</button>
            </div>
          </div>
        </div>
      </section>
      <section id="analyzer" class="center hidden">
        <h1>Analyzer</h1>
        <div class="frame" style="position: absolute; top: 120px; left: 50px; width: 350px; height: 50px;">
          <input onclick="getpath(1)" type="button" id="fileinputa" style="display: none;">
          <label class="btns" for="fileinputa" style="cursor: pointer;">Select a file</label>
          <span class="frame" style="padding:10px" id="selectedFileName1">None</span>
        </div>
        <div class="frame" style="position: absolute; top: 120px;left:500px; width:400px; height:360px;">
          <h1> Output: <button onclick="document.getElementById('outputanalyzer').select(); document.execCommand('copy');createnotification('success', 'Copied');" style="margin-left: 150px;" class="btns">Copy Output</button></h1>
          <textarea class="scroll-box" id="outputanalyzer" style="height:250px;width: 380px ;font-family: 'Share Tech Mono', monospace; resize:none;outline: none;"></textarea>
        </div>
        <div class="frame" style="position: absolute; top: 230px; left: 50px; width: 390px; height: 290px; padding:0px;">
          <h1 style="margin-left:150px;">options</h1>
          <div>
            <button style="margin-bottom: 15px;" class="btns" onclick="analyzer_command('detect_packer')">exe packer detector</button>
            <button style="margin-bottom: 15px;" class="btns" onclick="analyzer_command('unpack_exe')">unpack exe</button>
            <button style="margin-bottom: 15px;" class="btns" onclick="analyzer_command('sus_strings_lookup')">sus strings lookup</button>
            <button style="margin-bottom: 15px;" class="btns" onclick="analyzer_command('all_strings_lookup')">all strings lookup</button>
            <button style="margin-bottom: 15px;" class="btns" onclick="analyzer_command('get_file_hashs')">get file hashs</button>
          </div>
        </div>
      </section>
      <section id="plugins" class="center hidden">
        <div id="plugins-container">
        </div>      
      </section>
      <section id="settings" class="center hidden">
        <div class="frame" style="top: 50%;left: 50%;width: 30em;height: 18em;transform: translate(-50%, -50%);position: fixed;">
          <h1>De4py settings</h1>
          <div class="checkbox-container">
            <label for="RPC">RPC:</label>
            <input type="checkbox" id="RPC" onchange="updateConfig('__RPC__', this.checked)">
        </div>
        <br>
        <div class="checkbox-container">
            <label for="STEALTH_TITLE">Stealth titles:</label>
            <input type="checkbox" id="STEALTH_TITLE" onchange="updateConfig('__STEALTH_TITLE__', this.checked)">
        </div>
        <br>
        <div class="checkbox-container">
            <label for="LOAD_PLUGINS">Load plugins:</label>
            <input type="checkbox" id="LOAD_PLUGINS" onchange="updateConfig('__LOAD_PLUGINS__', this.checked)">
        </div>
        <br>
        <h4>Note: restart the tool to apply the new settings correctly</h4>        
        </div>
      </section>
      <section id="about" class="center hidden">
        <div class="about-info frame">
          <h1>About</h1>
          <p>GitHub: <a href="https://github.com/fadi002" target="_blank">fadi002</a>
          <p>GitHub: <a href="https://github.com/AdvDebug" target="_blank">Advdebug</a>
          </p>
          <p>Discord: @0xmrpepe, @advdebug</p>
        </div>
      </section>
    </div>
  </body>
</html>